VERSION 5.00
Begin VB.Form frmPAR 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "pro action replay"
   ClientHeight    =   2730
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6000
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmPAR.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2730
   ScaleWidth      =   6000
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer Timer1 
      Interval        =   1
      Left            =   2190
      Top             =   30
   End
   Begin VB.Frame Frame1 
      Caption         =   "code/description"
      Height          =   2565
      Left            =   90
      TabIndex        =   0
      Top             =   90
      Width           =   5805
      Begin VB.TextBox Text2 
         Height          =   285
         Left            =   1860
         TabIndex        =   5
         Top             =   270
         Width           =   3825
      End
      Begin VB.Frame Frame2 
         Caption         =   "stored codes"
         Height          =   1815
         Left            =   120
         TabIndex        =   2
         Top             =   630
         Width           =   5565
         Begin VB.ListBox List2 
            Height          =   1425
            Left            =   1740
            TabIndex        =   4
            Top             =   270
            Width           =   3705
         End
         Begin VB.ListBox List1 
            Height          =   1425
            Left            =   120
            TabIndex        =   3
            Top             =   270
            Width           =   1515
         End
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Left            =   120
         TabIndex        =   1
         Top             =   270
         Width           =   1635
      End
   End
End
Attribute VB_Name = "frmPAR"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()

  Frame1.left = Me.ScaleWidth / 2 - Frame1.Width / 2 'center frame horizontally
  Frame1.top = Me.ScaleHeight / 2 - Frame1.Height / 2 'center frame vertically

  PAROpen = True
  
  Call PARLoad
  
End Sub
Private Sub Form_Unload(Cancel As Integer)
  Cancel = 1
  
  Call Me.Hide
  
End Sub


Private Sub List1_Click()

  If List1.ListCount <> 0 Then
    List2.ListIndex = List1.ListIndex
  End If

End Sub


Private Sub List1_DblClick()

  Call frmSMS.mnuEnableCode_Click

End Sub


Private Sub List1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  If Button = 2 Then 'checks for right click
    Call PopupMenu(frmSMS.mnuPAR) 'pops up menu on main window
  End If
End Sub


Private Sub List2_Click()

  If List2.ListCount <> 0 Then
    List1.ListIndex = List2.ListIndex
  End If

End Sub


Private Sub List2_DblClick()

  Call frmSMS.mnuEnableCode_Click

End Sub


Private Sub List2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

  If Button = 2 Then 'checks for right click
    Call PopupMenu(frmSMS.mnuPAR) 'pops up menu on main window
  End If

End Sub


Private Sub Text1_KeyPress(KeyAscii As Integer)

  Select Case KeyAscii
    Case vbKeyReturn
      If Text1.Text <> "" And Text2.Text <> "" Then
        Call List1.AddItem(Text1.Text)
        Call List2.AddItem(Text2.Text)
        Text1.Text = ""
        Text2.Text = ""
        Call PARSave
      End If
  End Select
  
End Sub


Private Sub Text2_KeyPress(KeyAscii As Integer)
  Call Text1_KeyPress(KeyAscii)
End Sub


Private Sub Timer1_Timer()

  If PAREnabled = True Then
    For a = LBound(PARAddress) To UBound(PARAddress)
      If PARAddress(a) <> 0 And PARValue(a) <> 0 Then
        cartRam(PARAddress(a)) = PARValue(a)
      End If
    Next a
  End If

End Sub


